import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 沈明月
 * Date: 2022-11-02
 * Time: 22:53
 */
public class TestEighteen {
//通过递归实现N!：
public static int func(int n) {
    if(n == 1){
        return 1;
    }else{
        return n*func(n-1);
    }
}
    public static void main1(String[] args) {
        //输入n：
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        //运用函数：
        int ret = func(N);
        System.out.println("n!="+ret);
    }
}
